package com.etone.smartAudit.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.etone.smartAudit.enums.AccountType;
import com.etone.smartAudit.enums.StateType;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @author: sovy
 * @date: 2020/11/12
 * @description: 账号信息
 */

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "d_account_info")
public class AccountInfo implements Serializable {
    /**
     * 自增id
     */
    @TableId(value = "intId", type = IdType.AUTO)
    private Integer id;

    /**
     * 服务器id
     */
    @TableField(value = "intServerId")
    private Integer serverId;

    /**
     * 服务器ip
     */
    @TableField(exist = false)
    private String serverIp;

    /**
     * 账号类型
     */
    @TableField(value = "vcType")
    private AccountType type;

    /**
     * 账号
     */
    @TableField(value = "vcAccount")
    private String account;

    /**
     * 密码
     */
    @TableField(value = "vcPassword")
    private String password;

    /**
     * 备注
     */
    @TableField(value = "vcRemark")
    private String remark;

    /**
     * 数据库名称
     */
    @TableField(value = "vcDatabaseName")
    private String databaseName;

    /**
     * schema
     */
    @TableField(value = "vcSchemaName")
    private String schemaName;

    /**
     * 项目id
     */
    @TableField(value = "intItemId")
    private Integer itemId;

    /**
     * 项目名称
     */
    @TableField(value = "vcItemName")
    private String itemName;


    /**
     * 创建人id
     */
    @TableField("intCreateAdminId")
    private Integer createAdminId;

    /**
     * 创建人名称
     */
    @TableField("vcCreateAdminName")
    private String createAdminName;

    /**
     * 创建时间
     */
    @TableField("dtCreateTime")
    private Date createTime;

    /**
     * 端口号
     */
    @TableField("intPort")
    private Integer port;

    /**
     * 是否是超级管理员
     */
    @TableField("isSupper")
    private Boolean isSupper;

    /**
     * 状态
     */
    @TableField("vcState")
    private StateType state;

    private static final long serialVersionUID = 1L;
}